package com.java.goods.controller;


import com.java.common.vo.R;
import com.java.goods.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品表 前端控制器
 * </p>
 *
 * @author jiangli
 * @since 2019-12-15
 */
@RestController
@RequestMapping("/goods/goods")
public class GoodsController {
	@Autowired
	private GoodsService goodsService;

	@RequestMapping("/getIndexItem")
	public R getIndexItem() {
		return goodsService.getIndexItem();
	}

	@RequestMapping("/geItem")
	public R geItem(@RequestParam("id") Long id){
		return goodsService.geItem(id);
	}

}

